Enrol API
Objective
The Enrol API is used to enrol users in the Monitoring DB.
The Monitoring DB will be separate from the Screening DB, as clients typically aim to monitor only successfully onboarded customers while screening all customers.
API URL
https://ind-engine.thomas.hyperverge.co/v1/amlMonitoringEnrol
API Endpoint
amlMonitoringEnrol
Overview
The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.
Authentication
You need a unique pair of application ID (appId) and application key (appKey) from HyperVerge to verify your identity for accessing the API.
API Request Details
Method - POST
Headers
| Parameter | Mandatory or Optional | Description | Allowed Values |
|---|---|---|---|
| content-type | Mandatory | This parameter defines the media type for the request payload | application/json |
| appId | Mandatory | The application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab. | This should be a unique value |
| appKey | Mandatory | The application key shared by HyperVerge. You can find the details in the dashboard's credentials tab. | This should be a unique value |
| transactionId | Mandatory | A unique identifier for tracking a user journey | This should be both unique and easily associated with the user's journey in your application(s) |
Input
The following table provides the complete information on the parameter used in the request body for the API calls.
| Parameter | Description | Mandatory or Optional | Allowed Values | Default Value |
|---|---|---|---|---|
customerId | Request ID returned from the original AML Search API call. The default validity for this ID is 14 days, but can be configured according to your data retention requirements. | Mandatory | Not Applicable | Not Applicable |
Request
The following code snippet demonstrates a standard curl request for the API:
curl --location --request POST 'https://ind-engine.thomas.hyperverge.co/v1/amlMonitoringEnrol' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--data '{
"customerId": "<Request_ID_of_the_original_AML_Search_Call>"
}'
Success Response
The following code snippet demonstrates a success response from the API:
{
"status": "success",
"statusCode": 200,
"result": {
"message": "Enrolled Successfully",
"enrolledCustomerId": "<ENROLLED_CUSTOMER_ID_GOES_HERE>"
}
}
Success Response Details
| Parameter | Type | Description |
|---|---|---|
message | string | A message describing the result |
enrolledCustomerId | string | The ID of the enrolled customer |
Failure Responses
- No Record for Customer ID
- Customer ID exists
The following is a sample response when no matching record is found against the Customer ID:
{
"status": "failure",
"statusCode": 400,
"result": {
// This error can be thrown when the corresponding request and
// response data for requestID are not found
"message": "Invalid CustomerId. No records found."
}
}
The following is a sample failure response when the customer ID already exists.
{
"status": "failure",
"statusCode": 400,
"result": {
// This error can be thrown if the data for requestID
// is already enrolled in the database
"message": "CustomerId already exists"
}
}
Error Responses
The following is a sample response for a server error.
{
"message": "Internal Server Error",
"statusCode": 500,
"status": "failure"
}
Failure and Error Response Details
failure status, with a relavant status code and error message. The following table lists all error responses: | Status Code | Error Message | Error Description |
| 400 | Missing required request parameters | Some mandatory request parameters are missing in the API request made. Check if "customerId" is given in request body |
| 400 | Customer ID already exists | The customerId already exists. Please pass a unique customerId with alphanumeric characters. |
| 401 | Missing/Invalid credentials | The appId/ appKey is missing or incorrect in the request headers |
| 403 | Access Denied | Please contact the HyperVerge team |
| 500 | Internal Server Error | Please check the request headers or contact the HyperVerge team for resolution |